package com.xymtop.Service;

import com.xymtop.Entity.TheClass;
import com.xymtop.Server.Util.DBService;

import java.util.List;

/**
 * @ClassName : TheClassService
 * @Description : 班级的操作
 * @Author : 肖叶茂
 * @Date: 2022/12/13  17:21
 */
public class TheClassService {
    public List<Object> getList(String major) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        List<Object> objects = DBService.Get("SELECT * FROM `javaweb`.`class` where major = "+major, TheClass.class.getCanonicalName());
        if(!objects.isEmpty()){
            return  objects;
        }else {
            return null;
        }
    }
}
